/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package basicserver;

import br.com.aggjpsv.libraryserver.FactoryAbstract;
import br.com.aggjpsv.libraryserver.thread.HTTPReplyBasic;
import br.com.aggjpsv.libraryserver.thread.HTTPResponseBasic;
import java.io.DataOutputStream;
import java.io.OutputStream;
import java.net.Socket;

/**
 *
 * @author SergioPeres
 */
public class WebFactory extends FactoryAbstract {

    public WebFactory(String[] parametros) {
        super(parametros);
    }

    @Override
    public Runnable getService(Socket socket) {
        return new HTTPReplyBasic(this, socket);
    }

    @Override
    public HTTPResponseBasic getRespose(OutputStream output) {
        return new HTTPResponseBasic(this, new DataOutputStream(output));
    }
    
    
    private boolean isGet(String s) {
        return s.equalsIgnoreCase("GET");
    }
}
